while (true) {
	try {
		// auto.waitFor();
		// console.hide();
		console.show();
		while (true) {
			var parent = clickable(true).find();
			toastLog("正在等待出现选择题...");
			if (parent !== null) {
				log("找到可点击组件的数量：" + parent.length);
				if (parent.length > 7) break;
			}
			sleep(5000);
			// break;
		}
		toastLog("似乎找到选择题: " + parent.length);
		// setTimeout(() => {}, 2000);
		sleep(2000);
		var list = new Array();
		for (var i = 0; i < parent.length; i++) {
			log(i + ": " + parent[i].bounds());
			list.push(parent[i].bounds());
		}
		console.show();
		list.forEach((rect, i) => {
			log(
				i + " :: " + rect.left + " :: " + rect.right + " :: " + rect.centerY()
			);
			// swipe(540, 400, rect.centerX(), rect.centerY(), 2000);
			// swipe(rect.left, rect.centerY(), rect.right, rect.centerY(), 2000);
		});
		log("选择 C项");
		click(list[3].centerX(), list[3].centerY());
		sleep(500);
		log("点击 确定");
		click(list[0].centerX(), list[0].centerY());
		log("程序暂停5秒");
		sleep(5e3);
		log("点击 继续听讲");
		var parent = clickable(true).find();
		click(parent[1].bounds.centerX(), parent[1].bounds.centerY());
		// console.show();
		console.hide();
	} catch (error) {
		log(error);
	}
}
